using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class so_gal_amtrakMap : EntityTypeConfiguration<so_gal_amtrak>
    {
        public so_gal_amtrakMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.SectionString)
                .HasMaxLength(500);

            this.Property(t => t.SECTION_LABEL)
                .IsFixedLength()
                .HasMaxLength(3);

            this.Property(t => t.Segment_Number)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.AMTRAK___RAIL_CODE)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.AMTRAK___RAIL_NUMBER)
                .IsFixedLength()
                .HasMaxLength(3);

            this.Property(t => t.AMTRAK___RAIL_NAME)
                .IsFixedLength()
                .HasMaxLength(12);

            this.Property(t => t.TRAIN_NUMBER)
                .IsFixedLength()
                .HasMaxLength(4);

            this.Property(t => t.CLASS_OF_SERVICE)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.STATUS)
                .IsFixedLength()
                .HasMaxLength(2);

            this.Property(t => t.DEPARTURE_DATE)
                .IsFixedLength()
                .HasMaxLength(5);

            this.Property(t => t.DEPARTURE_TIME)
                .IsFixedLength()
                .HasMaxLength(5);

            this.Property(t => t.ARRIVAL_TIME)
                .IsFixedLength()
                .HasMaxLength(5);

            this.Property(t => t.NEXT_DAY_ARRIVAL_INDICATOR)
                .IsFixedLength()
                .HasMaxLength(1);

            this.Property(t => t.ORIGIN_CITY_INFORMATION)
                .IsFixedLength()
                .HasMaxLength(16);

            this.Property(t => t.DESTINATION_CITY_INFORMATION)
                .IsFixedLength()
                .HasMaxLength(16);

            this.Property(t => t.DOMESTIC_INTERNATIONAL_INDICATOR)
                .IsFixedLength()
                .HasMaxLength(1);

            this.Property(t => t.INDICATOR_RESERVED_FOR_FUTURE_USE)
                .IsFixedLength()
                .HasMaxLength(1);

            this.Property(t => t.C_BLANKS)
                .IsFixedLength()
                .HasMaxLength(4);

            this.Property(t => t.STOPOVER_INDICATORS)
                .IsFixedLength()
                .HasMaxLength(1);

            this.Property(t => t.NUMBER_OF_STOPS)
                .IsFixedLength()
                .HasMaxLength(1);

            this.Property(t => t.BLANKS)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.NAUTICAL_MILES)
                .IsFixedLength()
                .HasMaxLength(5);

            this.Property(t => t.FLIGHT_COUPON_INDICATOR)
                .IsFixedLength()
                .HasMaxLength(1);

            this.Property(t => t.SEGMENT_IDENTIFIER)
                .IsFixedLength()
                .HasMaxLength(1);

            // Table & Column Mappings
            this.ToTable("so_gal_amtrak");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.reference).HasColumnName("reference");
            this.Property(t => t.SectionString).HasColumnName("SectionString");
            this.Property(t => t.MIr).HasColumnName("MIr");
            this.Property(t => t.SECTION_LABEL).HasColumnName("SECTION LABEL");
            this.Property(t => t.Segment_Number).HasColumnName("Segment Number");
            this.Property(t => t.AMTRAK___RAIL_CODE).HasColumnName("AMTRAK / RAIL CODE");
            this.Property(t => t.AMTRAK___RAIL_NUMBER).HasColumnName("AMTRAK / RAIL NUMBER");
            this.Property(t => t.AMTRAK___RAIL_NAME).HasColumnName("AMTRAK / RAIL NAME");
            this.Property(t => t.TRAIN_NUMBER).HasColumnName("TRAIN NUMBER");
            this.Property(t => t.CLASS_OF_SERVICE).HasColumnName("CLASS OF SERVICE");
            this.Property(t => t.STATUS).HasColumnName("STATUS");
            this.Property(t => t.DEPARTURE_DATE).HasColumnName("DEPARTURE DATE");
            this.Property(t => t.DEPARTURE_TIME).HasColumnName("DEPARTURE TIME");
            this.Property(t => t.ARRIVAL_TIME).HasColumnName("ARRIVAL TIME");
            this.Property(t => t.NEXT_DAY_ARRIVAL_INDICATOR).HasColumnName("NEXT DAY ARRIVAL INDICATOR");
            this.Property(t => t.ORIGIN_CITY_INFORMATION).HasColumnName("ORIGIN CITY INFORMATION");
            this.Property(t => t.DESTINATION_CITY_INFORMATION).HasColumnName("DESTINATION CITY INFORMATION");
            this.Property(t => t.DOMESTIC_INTERNATIONAL_INDICATOR).HasColumnName("DOMESTIC/INTERNATIONAL INDICATOR");
            this.Property(t => t.INDICATOR_RESERVED_FOR_FUTURE_USE).HasColumnName("INDICATOR RESERVED FOR FUTURE USE");
            this.Property(t => t.C_BLANKS).HasColumnName("[BLANKS");
            this.Property(t => t.STOPOVER_INDICATORS).HasColumnName("STOPOVER INDICATORS");
            this.Property(t => t.NUMBER_OF_STOPS).HasColumnName("NUMBER OF STOPS");
            this.Property(t => t.BLANKS).HasColumnName("BLANKS");
            this.Property(t => t.NAUTICAL_MILES).HasColumnName("NAUTICAL MILES");
            this.Property(t => t.FLIGHT_COUPON_INDICATOR).HasColumnName("FLIGHT COUPON INDICATOR");
            this.Property(t => t.SEGMENT_IDENTIFIER).HasColumnName("SEGMENT IDENTIFIER");
        }
    }
}
